#makefile for market project
CC=g++
CFLAGS=-c -g
SRC=$(wildcard *.cpp)
OBJ=$(SRC:.cpp=.o)

all:client server

client:ClientSocket.o echo_client.o Socket.o
	$(CC) $^ -o $@

server:ServerSocket.o echo_server.o Socket.o
	$(CC) $^ -o $@

ClientSocket.o ServerSocket.o echo_client.o echo_server.o:SocketException.h

%.o:%.cpp 
	$(CC) $(CFLAGS) $< -o $@

clean:
	rm -rf *.o client server
